Skip to content

Add weak consistency option to DescribeNamespaceRequest#775

Merged
simvlad merged 1 commit intomasterfrom
simvlad/describe-namespace-weak-consistency
Apr 28, 2026
Merged

Add weak consistency option to DescribeNamespaceRequest#775
simvlad merged 1 commit intomasterfrom
simvlad/describe-namespace-weak-consistency

Conversation

@simvlad
Copy link
Copy Markdown
Contributor

@simvlad simvlad commented Apr 28, 2026

What changed?
Added weak_consistency boolean field to DescribeNamespaceRequest. When set to true, the server may serve the response from an eventually-consistent source (e.g. the in-memory namespace registry) instead of reading through to persistence.

Why?
DescribeNamespace currently always reads through to the persistence store. The new field lets clients opt into eventually-consistent reads where read-after-write semantics aren't required, while preserving the existing strong-consistency contract for operator/admin callers (default behavior unchanged).

Breaking changes
None. Additive field with default false, preserving current behavior for clients that don't set it.

Server PR
temporalio/temporal#10103

Copy link
Copy Markdown
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should probably reference that the SDK should use this when fetching namespace capabilities on startup since I believe that's the main reason we're adding this flag

@simvlad simvlad force-pushed the simvlad/describe-namespace-weak-consistency branch from d2aaf78 to c74037a Compare April 28, 2026 19:05
@simvlad simvlad enabled auto-merge (squash) April 28, 2026 19:06
@simvlad simvlad merged commit df4181f into master Apr 28, 2026
4 checks passed
@simvlad simvlad deleted the simvlad/describe-namespace-weak-consistency branch April 28, 2026 19:07
simvlad added a commit to temporalio/temporal that referenced this pull request Apr 30, 2026
## What changed?
Added server-side handling for the new `weak_consistency` flag on
`DescribeNamespaceRequest` (proto change in
temporalio/api#775). When the flag is set,
`DescribeNamespace` is served from the in-memory namespace registry,
bypassing the metadata store. When unset, behavior is unchanged.

## Why?
`DescribeNamespace` currently always reads through to the persistence
store. The new field lets clients opt into eventually-consistent reads
where read-after-write semantics aren't required, while preserving the
existing strong-consistency contract for operator/admin callers (default
behavior unchanged).

## How did you test it?
- [X] built
- [X] added new unit test(s)
- [X] added new functional test(s)

## Potential risks
- Eventual consistency on when weak_consistency is set. A namespace
created within the registry's refresh interval may return
`NamespaceNotFound` even though it exists in persistence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants